package com.hq.controller;

import com.hq.bean.Company;
import com.hq.service.CompanyService;
import org.aspectj.apache.bcel.generic.ObjectType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class CompanyController {

    @Resource
    private CompanyService companyService;

    @RequestMapping("companyList.do")
    @ResponseBody
    public Object companyList(){
        List list=companyService.companyList();
        return list;
    }


    @RequestMapping("toadd.do")
    public String toadd(){
        return "add";
    }
}
